#include<stdio.h>

int main()
{
	int n1, n2, i, k, a, n;
	while(scanf("%d %d", &n1, &n2)==2){
		printf("%d %d", n1, n2);
		if( n1>n2){
			a=n1;
			n1=n2;
			n2=a;
		}
		a = 0;
		for( i=n1; i<=n2; i++){
			k = 0;
			n=i;
			while(n!=1){
				if( n%2){
					n*=3;
					n+=1;
				}
				else n/=2;
				k++;
			}
			if( k>a) a=k;
		}
		printf(" %d\n", a+1);
	}
	return 0;
}
